#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int max = 0, Max = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == 1)
            max++;
        else
        {
            Max = Max > max ? Max : max;
            max = 0;
        }
    }
    Max = Max > max ? Max : max;
    return Max;
}

int main()
{
    int arr[6] = { 1,1,0,1,1,1 };
    int ret = findMaxConsecutiveOnes(arr, 6);
    printf("%d", ret);
    return 0;
}